1. Technical Field
This disclosure relates to techniques for estimating motion, applicable to a sequence of images provided directly or indirectly by an image sensor in motion, for example for the purposes of determining the motion of an entity equipped with this image sensor. The subject matter of this disclosure is particularly suitable for use in an optical mouse which can be connected to a computer system.
2. Description of the Related Art
Generally the mouse is moved over a suitable surface, and a video sensor attached to the mouse captures images from this surface while it is in motion. The displacement of the mouse can thus be reconstructed from the relative positions of objects in the successively captured images. From this displacement, one can deduce a displacement which can be given to a cursor representing the movement of the mouse on the computer screen.
Certain processes of this type are used in another technical field: video compression.
The techniques for estimating the motion of an entity from a sequence of images are based on associating a motion vector with each of the processed images. Such a vector has a vertical component and a horizontal component. It represents the motion of the mouse between one image to another. The motion of all the pixels in each image to be processed can be represented by a single motion vector.
This type of device is subject to specific technical constraints, particularly a time constraint. The image processing must be performed within a very short period so that the mouse movement can be indicated on the computer screen in a manner which appears instantaneous to the user. Another very important constraint on this type of device is the production cost.
In certain cases, particularly for the purposes of reducing the processing time, the mouse movement between two successive images is estimated by determining the motion between the two images in a portion of the image, composed of a given block of pixels. In what follows, the block of pixels used in this way is called the “correlation block”. The size of this block is called the “correlation window”.
FIGS. 1a, 1b and 1c illustrate a definition of a vector indicating the motion between two successively processed images 101 and 102 in a sequence. The image 101 is a previously processed image: a motion vector has therefore already been associated with it. The image 102 is an image currently being processed in order to associate it with a motion vector representing the mouse movement occurring between the image 101 and the image 102.
The images in the sequence containing the images 101 and 102 each comprise a given number of pixels, for example N×N for a square image with dimensions of N pixels by N pixels. N can, for example, be equal to 20.
The motion vector between the two images 101 and 102 is determined on the basis of a block of pixels of fixed dimensions comprised within the images.
For example, the size of the block of pixels is x multiplied by y, if the block is x pixels in width along the X axis (horizontal axis for example) and y pixels in height along the Y axis (vertical axis for example). For example, x=y=n. For example, when N is equal to 20, n may be equal to 14.
To determine the motion vector between the two images 101 and 102, consider for example in image 101 the block 11 of pixels with dimensions of n pixels by n pixels, centered relative to the center of the image 101.
Next, some candidate motion vectors are defined, which are vectors likely to represent the movement of the mouse between the two images 101 and 102. These candidate vectors are generally defined as a function of the motion vectors previously associated with the images preceding the image 102 in the sequence of images captured by the mouse.
Then, successively considering each candidate motion vector defined in that manner:                the candidate motion vector is applied to the block of pixels 11 defined in the image 101: the result of this translation applied to the block of pixels 11 is a block of pixels with dimensions of n pixels by n pixels pointed to in the image 102,        a correlation is then calculated between the values of the pixels in the block 11 of pixels in the image 101 and the values of the pixels in the corresponding block of pixels pointed to in the image 102.        
Next the candidate motion vector is selected which had the highest calculated correlation among the successively considered motion vectors. This vector is then associated with the current image 102.
In the case illustrated in FIGS. 1a, 1b and 1c, the selected motion vector is represented by the arrow 105. The movement of the mouse between the image 101 and the image 102 is represented by this motion vector 105 associated with the image 102.
The result of the translation by the selected motion vector 105 of the correlation block 11 with dimensions of n pixels by n pixels, in the image 101, is the block 12 with dimensions of n pixels by n pixels, in the image 102.
The size of the correlation block used to estimate the displacement of the mouse has an impact on the performance of the mouse movement estimation.
First, the size of the correlation block relative to the image size limits the maximum detectable values of the motion vector representing the movement of the mouse between two images.
Next, the greater the size of the correlation block relative to the size of the image, the more accurate the motion estimate, because it is then less sensitive to noise: the signal-to-noise ratio decreases when the number of pixels increases. However, when the size of the correlation block is large relative to the image, estimating the motion vectors during high mouse displacement speeds requires a high image capture frequency and image processing frequency.                Lastly, the smaller the size of the block relative to the size of the image, the more it is possible to determine motion vectors corresponding to high mouse displacement speeds at a constant image capture frequency.        
It is therefore necessary to create a compromise between the precision of the estimation, the frequency of the image capture, and the size of the image.